//
//  ViewController.m
//  Localization
//
//  Created by LTJ on 14/11/3.
//  Copyright (c) 2014年 LTJ. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    UILabel *biaotiLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 50, 300, 40)];
    biaotiLabel.text = NSLocalizedStringFromTable(@"biaoti", @"InfoPlist", @""); // 其中第二个参数就是Supporting Files文件夹下的InfoPlist.strings文件
    biaotiLabel.backgroundColor = [UIColor cyanColor];
    biaotiLabel.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:biaotiLabel];
    [biaotiLabel release];
    
    
    
    UILabel *usernameLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 130, 110, 40)];
    usernameLabel.text = NSLocalizedStringFromTable(@"username", @"InfoPlist", @""); // 其中第二个参数就是Supporting Files文件夹下的InfoPlist.strings文件
    usernameLabel.backgroundColor = [UIColor cyanColor];
    usernameLabel.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:usernameLabel];
    [usernameLabel release];
    
    UITextField *usernameTextField = [[UITextField alloc] initWithFrame:CGRectMake(130, 130, 170, 40)];
    usernameTextField.borderStyle = UITextBorderStyleBezel;
    usernameTextField.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:usernameTextField];
    [usernameTextField release];
    
    UILabel *passwordLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 190, 110, 40)];
    passwordLabel.text = NSLocalizedStringFromTable(@"password", @"InfoPlist", @"");
    passwordLabel.backgroundColor = [UIColor cyanColor];
    passwordLabel.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:passwordLabel];
    [passwordLabel release];
    
    UITextField *passwordTextField = [[UITextField alloc] initWithFrame:CGRectMake(130, 190, 170, 40)];
    passwordTextField.borderStyle = UITextBorderStyleBezel;
    passwordTextField.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:passwordTextField];
    [passwordTextField release];

    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
    
    
    
}

@end
